const express = require("express");
const app = express();

app.use((req, res, next) => {
  console.log("定义了一个全局生效的中间件");
  next();
});

app.get("/", (req, res) => {
  console.log("调用了 '/'这个路由模块");
  res.send("hello 陈伟霆");
});

app.get("/index", (req, res) => {
  console.log("调用了'/index'这个路由模块");
  res.send("hello 八百");
});

app.listen(80, () => {
  console.log("启动");
});
